class Employee {
    String name;

    public Employee(String name) {
        this.name = name;
    }

    // work 方法
    public void work() {
        System.out.println(name + "正在工作");
    }
}

class Teacher extends Employee {
    String subject;

    public Teacher(String name, String subject) {
        super(name);
        this.subject = subject;
    }

    @Override
    public void work() {
        System.out.println(name + "教" + subject);
    }
}

class Consultant extends Employee {
    String special;

    public Consultant(String name, String special) {
        super(name);
        this.special = special;
    }
    @Override
    public void work() {
        System.out.println(name + "负责" + special);
    }
}

// 测试类
public class work05 {
    public static void main(String[] args) {
        Employee emp1 = new Teacher("张三", "数学");
        Employee emp2 = new Consultant("李四", "计算机");

        emp1.work();
        emp2.work();
    }
}
